1) Field of the Invention
The present invention relates to a disk controlling apparatus and a computer product that can rewrite data that needs to be rewritten, on a priority basis.
2) Description of the Related Art
Conventionally, when a magnetic disk apparatus obtains data from a host computer or the like, the apparatus appends information such as a cyclic redundancy check (CRC) and an error correcting code (ECC) to the obtained data, and then writes the data to a magnetic disk.
However, changes occur as time passes, such as changes in the direction of the magnetization of the magnetic substance with which the magnetic disk is coated. Therefore, the magnetic disk apparatus becomes unable to read properly, the data that was written to the disk a predetermined time earlier.
Accordingly, to prevent the data written to the magnetic disk from becoming unreadable, magnetic disk apparatuses currently being used reread and rewrite the data periodically.
Japanese Patent Application Laid-open No. 2004-14090 discloses a technique that enables data written on a magnetic disk to be read efficiently, by changing the parameters of the data-reading circuit based on changes in the temperature of the magnetic disk apparatus.
However, this conventional technique has a drawback that it cannot rewrite data efficiently.
When the temperature of the magnetic disk apparatus is low, data written to the magnetic disk and data written at positions deviating from the track center suddenly become more difficult to read. Yet, these data are sequentially rewritten without distinguishing them from other data stored on the magnetic disk.
Therefore, it is important to promptly rewrite data that needs to be rewritten on a priority basis, rather than sequentially rewriting the data written on the magnetic disk.